import { getPlaylistDetail_api } from "@/api/homePage"
import { onMounted, ref } from "vue"

const usePlaylistDetailApi = (id: string) => {
    const playListDetail = ref<any>({})
    const getPlaylistDetail = () => {
        getPlaylistDetail_api(id).then((response: any) => {
            playListDetail.value = response.playlist
        })
    }
    onMounted(() => {
        getPlaylistDetail()
    })
    return {
        playListDetail
    }
}
export default usePlaylistDetailApi